<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="true">
  <head>  
    <title>图书/编辑</title>
    <%@ include file="../link_script.jsp" %>
    <script type="text/javascript">
    $(function() { 
      $("form").validity(function() {
        $("#bookName").require();
        $("#author").require();
      });
    });
  </script>
  </head>
<body>
<form action="book.do?method=editBook_Do" method="post" target="_self">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="../operate_button_add.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#b5d6e6">       
          <tr>
            <td width="100%" class="STYLE32">编辑图书</td>
          </tr>
          <tr>
            <td class="STYLE11"><table width="100%" border="0" bordercolor="#b5d6e6" cellpadding="0" cellspacing="0">
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;图书名称 : </td>
                <td class="STYLE11"><input type="text" id="bookName" name="bookName" value="${book.bookName}" size="50" title="图书名称不能为空"/></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;作者 : </td>
                <td class="STYLE11"><input type="text" id="author" name="author" value="${book.author}" size="30" title="作者不能为空" /></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;阅读情况 : </td>
                <td class="STYLE11">
                <select id="readState" name="readState">
                  <option value="${book.readState}">${book.readState}</option>
                  <option value="无" disabled>------</option>
                  <option value="想读">想读</option>
                  <option value="在读">在读</option>
                  <option value="已读">已读</option>                  
                </select>
                </td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;状态 : </td>
                <td class="STYLE11">
                <select id="bookState" name="bookState">
                  <option value="${book.bookState}">${book.bookState}</option>
                  <option value="无" disabled>------</option>
                  <option value="在藏">在藏</option>
                  <option value="丢失">丢失</option>
                  <option value="借出">借出</option>                   
                </select>
                </td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;购买日期 : </td>
                <td class="STYLE11"><input type="text" id="bookDate" name="bookDate" value="${book.bookDate}" size="10" />
               &nbsp;&nbsp;<font color="red">*</font>&nbsp;&nbsp; 购买日期，购买日期在结算时作为流水账的记账日期。</td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;定价: </td>
                <td class="STYLE11"><input type="text" id="bookPrice" name="bookPrice" value="${book.bookPrice}" size="10" />&nbsp;￥</td>
              </tr> 
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;费用: </td>
                <td class="STYLE11"><input type="text" id="bookExpenses" name="bookExpenses" value="${book.bookExpenses}" size="10" readonly />&nbsp;￥</td>
              </tr> 
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;卖家 : </td>
                <td class="STYLE11">
                <select id="shopID" name="shopID" onchange="javascript:change();">
                  <option value="${book.shop.shopID}">${book.shop.shopName}</option>
                  <option disabled="disabled">------</option>
                  <c:if test="${!empty shopList}">
                    <c:forEach items="${shopList}" var="s">
                      <option value="${s.shopID}">${s.shopName}</option>
                  </c:forEach></c:if></select></td>
              </tr>           
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;描述 : </td>
                <td class="STYLE11"><textarea id="bookDesc" name="bookDesc" cols="54" rows="4" style="font-family:宋体;font-size:12px">${book.bookDesc}</textarea></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;</td>
                <td class="STYLE11"><input type=hidden id="bookID" name="bookID" value="${book.bookID}" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td class="STYLE12"><input type="submit" value="提交"/><input type="reset" value="取消"/></td>
          </tr>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../no_page.jsp"%>
</table>
</form>
</body>
</html>
